package com.gupaoedu.pattern.observer.event;


import javax.xml.bind.SchemaOutputResolver;

/**
 * 2019/9/28
 * created by chenpp
 */
public class Mouse extends EventListener {

    public void click(){
        System.out.println("点击鼠标....");
        this.trigger(EventTypeEnum.CLICK.getName());
    }

    public void doubleClick(){
        System.out.println("双击了鼠标....");
        this.trigger(EventTypeEnum.DOUBLE_CLICK.getName());
    }

    public void down(){
        System.out.println("按下了鼠标....");
        this.trigger(EventTypeEnum.DOWN.getName());
    }

    public void focus(){
        System.out.println("鼠标聚焦了....");
        this.trigger(EventTypeEnum.FOCUS.getName());
    }
}
